package net.alan;

import org.apache.log4j.Logger;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ImportResource;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

import java.io.IOException;

/**
 * Author 李岩飞
 * Email eliyanfei@126.com
 * 2017/11/21
 * 启动   java -jar spring-boot-pay.jar --server.port=8886
 * linux 下 后台启动  nohup java -jar spring-boot-pay.jar --server.port=8886 &
 */
@SpringBootApplication
@ImportResource({"classpath:spring-context-dubbo.xml"})
@EnableCaching
@EnableScheduling
@Controller
public class Application extends WebMvcConfigurerAdapter {
    private static final Logger logger = Logger.getLogger(Application.class);

    @RequestMapping("/")
    public String greeting() {
        return "index";
    }


    public static void main(String[] args) throws InterruptedException,
            IOException {
        SpringApplication.run(Application.class, args);
    }

}